package com.kaluli.project.domain.entity;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.kaluli.system.domain.entity.DomainEntity;

@Entity
@Table(name = "kll_item_sku")
public class KllProductSku  extends DomainEntity implements Serializable{
	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Column(name="item_id" )
	private Long itemId;
	@Column(name="code")
	private String code;
	@Column(name="attr")
	private String attr;
	@Column(name="ware_sku")
	private String wareSku;
	@Column(name="price")
	private Double price;
	@Column(name="discount_price")
	private Double discountPrice;
	@Column(name="weight")
	private String weight;
	@Column(name="pic")
	private String pic;
	@Column(name="total_num")
	private Integer totalNum;
	@Column(name="lock_num")
	private Integer lockNum;
	@Column(name="storehouse_id")
	private Integer storehouseId;
	@Column(name="status")
	private Integer status;
	@Column(name="wupdate_time")
	private Long wupdate_time;
	@Column(name="goods_no")
	private String goodsNo;
	
	public Long getItemId() {
		return itemId;
	}
	public void setItemId(Long itemId) {
		this.itemId = itemId;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getAttr() {
		return attr;
	}
	public void setAttr(String attr) {
		this.attr = attr;
	}
	public String getWareSku() {
		return wareSku;
	}
	public void setWareSku(String wareSku) {
		this.wareSku = wareSku;
	}
	public Double getPrice() {
		return price;
	}
	public void setPrice(Double price) {
		this.price = price;
	}
	public Double getDiscountPrice() {
		return discountPrice;
	}
	public void setDiscountPrice(Double discountPrice) {
		this.discountPrice = discountPrice;
	}
	public String getWeight() {
		return weight;
	}
	public void setWeight(String weight) {
		this.weight = weight;
	}
	public String getPic() {
		return pic;
	}
	public void setPic(String pic) {
		this.pic = pic;
	}
	public Integer getTotalNum() {
		return totalNum;
	}
	public void setTotalNum(Integer totalNum) {
		this.totalNum = totalNum;
	}
	public Integer getLockNum() {
		return lockNum;
	}
	public void setLockNum(Integer lockNum) {
		this.lockNum = lockNum;
	}
	public Integer getStorehouseId() {
		return storehouseId;
	}
	public void setStorehouseId(Integer storehouseId) {
		this.storehouseId = storehouseId;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public Long getWupdate_time() {
		return wupdate_time;
	}
	public void setWupdate_time(Long wupdate_time) {
		this.wupdate_time = wupdate_time;
	}
	
	@ManyToOne(cascade = CascadeType.ALL, optional = false)
	 @JoinColumn(name="item_id", referencedColumnName="id",insertable = false, updatable = false)//外键为sut_id，与student中的id关联
	private KllProduct kllProduct;
	public KllProduct getKllProduct() {
		return kllProduct;
	}
	public void setKllProduct(KllProduct kllProduct) {
		this.kllProduct = kllProduct;
	}
	
	@OneToOne(cascade=CascadeType.ALL,fetch=FetchType.EAGER,targetEntity=KllWareHouse.class,optional=false)
	@JoinColumn(name="storehouse_id", referencedColumnName="id",insertable = false, updatable = false)
	private KllWareHouse kllWareHouse;
	public KllWareHouse getKllWareHouse() {
		return kllWareHouse;
	}
	public void setKllWareHouse(KllWareHouse kllWareHouse) {
		this.kllWareHouse = kllWareHouse;
	}
	public String getGoodsNo() {
		return goodsNo;
	}
	public void setGoodsNo(String goodsNo) {
		this.goodsNo = goodsNo;
	}
	
	
	
}
